package com.bed.lovewithpatientbed.dao;

import com.bed.lovewithpatientbed.pojo.Address;
import com.bed.lovewithpatientbed.pojo.AddressExample;
import java.util.List;

import com.bed.lovewithpatientbed.pojo.Hospital;
import org.apache.ibatis.annotations.Param;

public interface AddressDao {
    long countByExample(AddressExample example);

    int deleteByExample(AddressExample example);

    int deleteByPrimaryKey(Integer addressId);

    int insert(Address record);

    int insertSelective(Address record);

    List<Address> selectByExample(AddressExample example);

    Address selectByPrimaryKey(Integer addressId);

    int updateByExampleSelective(@Param("record") Address record, @Param("example") AddressExample example);

    int updateByExample(@Param("record") Address record, @Param("example") AddressExample example);

    int updateByPrimaryKeySelective(Address record);

    int updateByPrimaryKey(Address record);
    /**
     * @description 去重查询所有地址信息
     * @author tyl
     * @updateTime 2020/10/15 9:36
     */
    List<Address> selectByDistinct();

    /**
     * @title selectCity
     * @description 根据省份查询城市(去重)
     * @author sunningsheng
     * @updateTime
     * @throws
     */
    List<Address> selectCity(String province);

    /**
     * @title selectDistrict
     * @description 根据城市查询区(去重)
     * @author sunningsheng
     * @updateTime
     * @throws
     */
    List<Address> selectDistrict(String city);

    /**
     * @title selectHospital
     * @description 根据区查询医院(去重)
     * @author sunningsheng
     * @updateTime
     * @throws
     */
    List<Hospital> selectHospital(String district);

    List<Address> selectByCity1(String province);

    List<Address> selectByCity2(String province,String city);
}